package com.rd.student.dashuju.zhengruixian.test0801;

import java.util.Arrays;

public class Add {
    public static void main(String[] args) {
        int[] arr=new int[]{1, 3, 5, 7, 9, 11, 13, 15, 17, 0};
        insert(arr,5,10);
        System.out.println(Arrays.toString(arr));

    }
    public static void insert(int[] arr,int index,int num){
        for (int i= arr.length-1;i>index;i--){
            arr[i]=arr[i-1];
        }
        arr[index]=num;
    }
}
